-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add requires_file attr for py_wheel #644
feat: add requires_file attr for py_wheel #644
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). For more information, open the CLA check for this pull request. |
0f95f75
to
28e48e7
Compare
Any background for why this is needed? Maybe the documentation should be updated to reflect that and what's the interaction with "requires" attribute? |
Because sometimes we may write codes like this in #!/usr/bin/env python
from setuptools import setup, find_packages
with open("requirements.txt") as fp:
install_requires = fp.read()
setup(
# get requires from file
install_requires=install_requires,
) However, in If |
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
Is there any update of this PR? |
@weixiao-huang would you be able to rebase this and address conflicts? |
35abc61
to
feba774
Compare
feba774
to
458d28c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm no maintainer but did have some requests 😅
cd7edd7
to
aa3beac
Compare
if arguments.requires_file: | ||
with open(arguments.requires_file) as fp: | ||
additive_requires_list = ["Requires-Dist: {}".format(line) for line in fp.read().strip().split("\n")] | ||
metadata += "\n" + "\n".join(additive_requires_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't that leave you with two \n in a row, so everything below will be interpreted as a description?
Can we have a test?
@@ -398,6 +403,10 @@ def main() -> None: | |||
encoding="utf-8") as metadata_file: | |||
metadata = metadata_file.read() | |||
|
|||
if arguments.requires_file: | |||
with open(arguments.requires_file) as fp: | |||
additive_requires_list = ["Requires-Dist: {}".format(line) for line in fp.read().strip().split("\n")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why read().strip().split() and not readlines()?
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
@weixiao-huang knudge |
Sorry, I'll check it recently |
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
This PR was automatically closed because it went 30 days without a reply since it was labeled "Can Close?" |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information